<?php


namespace App\Transformers\System;


use App\Models\SystemGroupData;
use League\Fractal\TransformerAbstract;

class SystemGroupDataTransformer extends TransformerAbstract
{
    public function transform(SystemGroupData $data)
    {
        return [
            'id' => $data->id,
            'group_id' => $data->group_id ?? '',
            'value' => $data->value ?? '',
            'sort' => $data->sort ?? '',
            'status' => $data->sort ?? '',
            'created_at' => $data->created_at ? $data->created_at->format("Y-m-d H:i:s") : '',
            'updated_at' => $data->updated_at ? $data->updated_at->format("Y-m-d H:i:s") : '',
        ];
    }
}
